﻿<Window 
    x:Class="iopt.solvency.pillarone.client.desktop.Views.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
    xmlns:viewModels="clr-namespace:iopt.solvency.pillarone.client.desktop.ViewModels"
    mc:Ignorable="d"  Background="White"
    Title="{Binding Path=Title}"
    WindowStartupLocation="CenterScreen"
    Height="400"
    Width="800" 
    xmlns:igDock="http://infragistics.com/DockManager"                   
    xmlns:igRibbon="http://infragistics.com/Ribbon">

    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>

    <Grid Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Menu Background="White">
            <MenuItem Header="FICHIER" />
            <MenuItem Header="EDITION" />
            <MenuItem Header="PROJET" />
            <MenuItem Header="MODELE" />
            <MenuItem Header="SCENARIOS" />
            <MenuItem Header="REPORTING" />
            <MenuItem Header="AFFICHAGE" ItemsSource="{Binding Tools}" DisplayMemberPath="Caption" >
                <MenuItem.ItemContainerStyle>
                    <Style TargetType="MenuItem" >
                        <Setter Property="Command" Value="{Binding ShowToolCommand}" />
                    </Style>
                </MenuItem.ItemContainerStyle>
            </MenuItem>
            <MenuItem Header="AIDE" />
        </Menu>
        <ToolBar Grid.Row="1"  Background="White">
            <Button Width="32" Height="32" Margin="2">
                <Image Source="/iopt.solvency.pillarone.client.desktop;component/Resources/login.png" />
            </Button>
            <Button Width="32" Height="32" Margin="2">
                <Image Source="/iopt.solvency.pillarone.client.desktop;component/Resources/logout.png" />
            </Button>
            <Separator />
            <Button Width="32" Height="32" Margin="2" Command="{Binding SaveChangeCommand, Mode=OneWay}">
                <Image Source="/iopt.solvency.pillarone.client.desktop;component/Resources/Save.png" />
            </Button>
            <Button Width="32" Height="32" Margin="2" Command="{Binding SaveAllChangeCommand, Mode=OneWay}">
                <Image Source="/iopt.solvency.pillarone.client.desktop;component/Resources/Save all.png" />
            </Button>
            <Separator />
        </ToolBar>
        <avalonDock:DockingManager Grid.Row="2"
            AllowMixedOrientation="True"
            Name="DockingManager" Margin="2"
            Background="White" 
            DocumentsSource="{Binding Path=Documents}"
            AnchorablesSource="{Binding Path=Tools}">

            <avalonDock:DockingManager.DocumentHeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Content.Caption}" />
                </DataTemplate>
            </avalonDock:DockingManager.DocumentHeaderTemplate>

            <avalonDock:DockingManager.AnchorableHeaderTemplate >
                <DataTemplate>
                    <TextBlock Text="{Binding Content.Caption}" >
                    </TextBlock>
                </DataTemplate>
            </avalonDock:DockingManager.AnchorableHeaderTemplate>

            <avalonDock:DockingManager.DocumentTitleTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Content.Caption}" />
                </DataTemplate>
            </avalonDock:DockingManager.DocumentTitleTemplate>

            <avalonDock:DockingManager.AnchorableTitleTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Content.Caption}" >
                    </TextBlock>
                </DataTemplate>
            </avalonDock:DockingManager.AnchorableTitleTemplate>
           
        </avalonDock:DockingManager>
    </Grid>

</Window >
